package top.yehot.cmmu.swagger.config;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.boot.context.properties.ConfigurationProperties;

import lombok.Data;

@Data
@ConfigurationProperties("swagger")
public class SwaggerProperties {

	/**
	 * 是否开启swagger
	 */
	private Boolean enabled = false;

	/**
	 * 需要排除的服务
	 */
	private List<String> ignoreProviders = new ArrayList<String>();

	/**
	 * 服务名称和对应的中文名称
	 */
	private Map<String, String> services = new HashMap<String, String>();

	/**
	 * 设置接口信息
	 */
	private App appInfo;

	@Data
	public static class App {

		private String title;
		private String contact;
		private String contactEmail;
		private String version;
		private String license;
		private String licenseUrl;
		private String termsOfServiceUrl;
		private String description;
		private String basePackage;
		
		/**
		 * pbasePath 这个属性会在原来的basePath前面拼接上改值<br>
		 * 原来basePath = /kettle, 现在 pbasePath = /api, basePath = /api/kettle
		 */
		public String basePath;

	}

}
